home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 25 / Mac Magazin and MacEasy Magazine CD - Issue 25.iso / Grafik & Text / Alpha / Help / HTML Help < prev    next >
Text File  |  1996-08-18  |  65KB  |  1,546 lines

  1.                         HTML mode version 1.2
  2.     
  3.                            by Johan Linde
  4.                             August 1996
  5.                                                  
  6. Use the marks menu [M] ------------------------------------------------- >> 
  7. to quickly jump to different sections of this file.
  8.  
  9. There is also a version of this manual in HTML format, with lots of screen 
  10. shots.
  11.  
  12. HTML Mode is for editing HyperText Markup Language documents (suffix 
  13. ".html", ".htm" or ".shtml").  It is not a previewer, nor is it a verifier, 
  14. and you have to know at least some HTML to use it.  If you do not know about 
  15. HTML, I recommend that you read "A Beginner's Guide to HTML".  It is a good 
  16. first text to read.  You can find it at
  17. http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html 
  18. I have collected some other links to HTML guides, see the section on
  19. HTML Tutorials and references.
  20.  
  21. The basic idea with this HTML environment is to save you time while typing, 
  22. by having key bindings for all HTML elements.  Also, you do not have to 
  23. worry about misspelt HTML tags, missing end quotes, or missing end tags.
  24. HTML mode is probably most useful for HTML programmers with some experience 
  25. of HTML, who are looking for an editor which makes the editing easier and 
  26. faster.
  27.  
  28. When you use this package, by default you will see bullet characters (•), 
  29. called "tab marks", being dribbled near where you insert elements.  These 
  30. are supposed to be a feature.  The tab key takes you to the next one, and 
  31. automatically deletes the bullet.  Read the section "How to use tab marks", 
  32. to learn to use them in the best way.
  33.  
  34. ===============================================================================
  35. = HTML mode features
  36. ===============================================================================
  37.  
  38. • HTML mode knows HTML 3.2 as well as Netscape's extensions to HTML.
  39. • Tools to easily and quickly insert HTML elements and give them 
  40.   attributes. Each element has got its own key binding.
  41. • Tools to easily change or remove HTML elements.
  42. • Tools for building lists and tables.
  43. • You can define colors with a color picker to use on your web pages.
  44. • You can check that all links between your files are ok.
  45. • You can move files between folders and automatically update all links 
  46.   between and in them.
  47. • Support for editing of JavaScript.
  48. • Translation of special characters, å, ó, ü etc.  to 
  49.   and from their HTML entities.
  50. • Files are sent to your browser with one key stroke.
  51. • You can define new HTML elements. Therefore you don't have to wait for 
  52.   Alpha to be updated to use it for new HTML.
  53. • etc. etc.
  54.  
  55. Acknowledgment
  56.  
  57. First of all I would like to thank Pete Keleher for writing Alpha, the best 
  58. editor in the world, without my TCL code would be pretty useless.  I am 
  59. also indebted to Scott Brim who wrote an earlier version of Alpha's HTML 
  60. mode.  Some ideas and tcl code were taken from html.el for GNU Emacs and 
  61. latex.tcl for Alpha.
  62.     
  63. I want feedback! All comments on HTML mode are welcome.
  64. In particular, please tell me
  65. • about bugs of any kind,
  66. • about some new feature you want to have included in the HTML mode,
  67. • if you think some function behaves stupidly,
  68. • if some HTML element is not defined correctly,
  69. • if something is not explained well enough in this help file.
  70.  
  71. You may also tell me that you like HTML mode. :-)
  72.  
  73. If you want to hear about beta releases, send me a mail and 
  74. I will put you on the list.
  75.                                 Johan Linde <jl@theophys.kth.se>
  76.  
  77. If you like HTML mode and use it a lot, I would very much appreciate if you 
  78. send me a postcard and tell me that. It would give me new energy to add 
  79. new features to HTML mode. My address is
  80.  
  81. Johan Linde
  82. Lojovägen 61
  83. S-181 47 LIDINGÖ
  84. SWEDEN
  85.  
  86. But don't give me credit for something I haven't done.
  87.  
  88. ===============================================================================
  89. = Language
  90. ===============================================================================
  91.  
  92. My mother tongue is Swedish.  Therefore you will, no doubt, find 
  93. grammatical and other errors in this document and in HTML mode.  Please 
  94. tell me about any such error you find, in a menu, dialog box, error 
  95. message...
  96.  
  97. But before you complain, I must tell you that I know that "color" is spelt 
  98. "colour".  :-)
  99.  
  100. ===============================================================================
  101. = What's new in version 1.2
  102. ===============================================================================
  103. • The package HTML 2.0 is removed, since it is out-dated. From now on 
  104.   there will only be two packages, one with the latest official HTML and 
  105.   one where extensions have been included.
  106. • There is now only two way to input attributes, the dialogs introduced 
  107.   in 1.1 and the status bar.
  108. • Improved behavior when attributes are given in the status bar. ctrl-z to 
  109.   cancel, ctrl-f for a file dialog or new color. When a value is chosen 
  110.   from a popup window, Alpha immediately jumps to the next attribute.
  111. • A new userfriendly way to add new HTML elements.
  112. • A function to move files between folders and automatically update all 
  113.   links to and in them.
  114. • Changed JavaScript coloring. Only reserved words are colored, not built 
  115.   in methods and properties. Comments in JavaScript are now colored.
  116. • A window cache just like the URL cache. Frame names are automatically added 
  117.   to this cache.
  118. • A new submenu with plug-ins.
  119. • JavaScript's event handlers can now optionally appear in the attribute dialog.
  120. • Only one menu item for <A>.
  121. • Added SRC to <SCRIPT>.
  122. • Added <NOSCRIPT>, <MULTICOL> and <SPACER>.
  123. • Added FRAMEBORDER, BORDERCOLOR to <FRAME>.
  124. • Added FRAMEBORDER, BORDERCOLOR, BORDER to <FRAMESET>.
  125. • Added FACE to <FONT>.
  126. • Added onMouseOut to <A>.
  127. • Added onAbort, onError, onLoad to <IMG>.
  128. • Added onClick, onMouseOver, onMouseOut to <AREA>.
  129. • When trying to add a link via a file dialog, windows with ' <n>' added to 
  130.   the window name were asked to be saved even if they already were saved.  
  131.   Fixed!
  132. • Send file to browser didn't work for windows with ' <n>' appended. Fixed!
  133. • Problems finding the browser fixed.
  134. • Reveal color didn't find color attribute if color wasn't quoted. Fixed!
  135. • Check links didn't find BASE if it was split into two lines. Fixed!
  136. • Check links and cmd-double-click now correctly interpret paths of the form
  137.   "./file.html".
  138. • Check links and cmd-double-click now search for a file index.html when a 
  139.   link points to a folder.
  140. • Check links didn't work for files with UNIX or IBM newlines. (All links 
  141.   were found to be ok.) Fixed!
  142. • Some lists couldn't be inserted when using the status bar. Fixed!
  143. • 'Change opening' didn't work for INPUT elements in lower case. Fixed!
  144. • The variable htmlElemAttrsForAll is no longer supported.
  145. • Some other minor changes and bug fixes.
  146.  
  147. ===============================================================================
  148. = What's new in version 1.1.1
  149. ===============================================================================
  150.  
  151. • Rewrote some of the code so that HTML mode loads faster.
  152. • The menu Use Attributes is disabled when it is not needed.
  153. • Added <U> and <NOEMBED>.
  154. • The new suffix mapping is used to determine if a file is a HTML file 
  155.   when deciding which files to scan to check the links.
  156.  
  157. ===============================================================================
  158. = What's new in version 1.1
  159. ===============================================================================
  160.  
  161. • The HTML elements are put into three packages, HTML 2.0, HTML 3.2 and 
  162.   Extensions.
  163. • Support for JavaScript coloring and editing.
  164. • A function to check that all links between files in your home page are ok.
  165. • Attributes to an element can be input in one single dialog box, 
  166.   rather that giving the attributes one after another.
  167. • When you are asked about an URL attribute, you can choose a file via a 
  168.   file dialog. The relative path is automatically inserted.
  169. • "Fill paragraph" is now sensitive to HTML elements.
  170. • cmd-doubleclick on a relative URL opens the file, or if it does not 
  171.   exits, it can create a new file and save it in the right place.
  172. • You can define a new color when you are asked about a color attribute.
  173. • You can define files with footers, which can be automatically inserted 
  174.   when you create a new document.
  175. • Control that a value given to a number attribute is valid.
  176. • Control that a value given to a color attribute is valid.
  177. • New dialog box for "New document" where you can choose which elements 
  178.   you want in the head, and also select a file with a footer to insert in the 
  179.   end of the body.
  180. • Character translation can be done in a selection. The translation is also
  181.   a lot faster.
  182. • Tab marks can be removed in a selection.
  183. • "Select container" and "Untag" now find the correct pair of tags when 
  184.   there are elements of the same kind within each other, like a <TABLE> within 
  185.   a <TABLE>.
  186. • "Select container" and "Untag" now ignores all tags without a closing tag.
  187. • A function to select a tag with no closing tag.
  188. • A function to untag a element with no closing tag.
  189. • A function to untag a container and automatically select the content.
  190. • A function to change an element in the document.
  191. • New key binding for untag: ctrl-F1. It has been bundled with the new functions 
  192.   just mentioned.
  193. • Mark file now finds headers with opening and closing tags on different 
  194.   lines. Each menu item is limited to 30 characters, not to make them too long.
  195. • If you use any of the two old ways of inputting attributes, you can 
  196.   set a flag for each element, so that you can optionally be asked about the 
  197.   attributes not chosen in the "Use attributes" menu.
  198. • A table template function, to quickly make tables.
  199. • With "Tabs to rows" you can now optionally put table headers in first 
  200.   row and/or column.
  201. • "Rows to tabs" now follow the HTML code, not the line breaks in the file.
  202. • A function to insert <BR> at the end of every line in a selection.
  203. • A function to remove every <BR> in a selection.
  204. • A function to insert <P> at empty lines in a selection.
  205. • A function to make a HTML list from a *'d list.
  206. • Undo is now easier, although you sometimes still have to make two "Undos" 
  207.   to undo something.
  208. • For attributes which can take any value, beginning and ending spaces are
  209.   no longer removed. Sometimes these spaces are wanted.
  210. • When <A NAME="xxx"> or <MAP NAME="xxx"> is inserted, "#xxx" is added to 
  211.   URL cache.
  212. • New dialog box for cleaning up URL cache.
  213. • Two identical colors can no longer be defined.
  214. • New elements STRIKE and DFN.
  215. • New element <INPUT TYPE=BUTTON> in extensions package. To be used 
  216.   together with JavaScript.
  217. • A couple of new attributes added so some elements.
  218. • For the AREA element, a check is made that you use one of the attributes 
  219.   HREF and NOHREF is used, but not both.
  220. • The key binding for "Comment line" have been changed to ctrl-C-L to 
  221.   conform with other modes.
  222.   
  223. ===============================================================================
  224. = What's new in version 1.0
  225. ===============================================================================
  226.  
  227. • A lot of new elements are included.
  228. • It's possible to define colors to use as background color, text color etc. 
  229.   from a color picker.
  230. • Translation of accented letters (é, á etc.) to HTML entities and vice versa.
  231. • The attributes of the elements are divided into required and optional ones.
  232.   If you skip a required one, no element is inserted. You can no longer make 
  233.   elements like <A></A>.
  234. • For some elements there is a separate key binding as well as menu item to
  235.   automatically skip all attributes.
  236. • Improved behavior when the status bar is used to input attributes.
  237. • Untagging works better.
  238. • Marking of the file works better.
  239. • Plus a number of other small changes.
  240.  
  241. ===============================================================================
  242. = Configuring HTML mode
  243. ===============================================================================
  244.  
  245. Home Page folder
  246.  
  247. To be able to check all links between your files, and to be able to insert 
  248. a link via a file dialog, you must set your Home Page folder. The idea is 
  249. that this folder, together with its subfolders, should contain all your 
  250. html files, and be a mirror of your home page at your server.
  251.  
  252. The Home Page folder is set via the menu Config -> App Paths.
  253.  
  254. Server URL
  255.  
  256. To be able to check all links between your files, and and to be able to insert 
  257. a link via a file dialog when you use the BASE element, you must set the 
  258. URL to your server. This is set via the HTML Utilities menu. In the dialog 
  259. box there are two field "Server URL" and "Path". If the URL to your home 
  260. page is http://www.somewhere.net/~myplace/ then set things like this:
  261.  
  262. Server URL: http://www.somewhere.net/
  263.       Path: ~myplace/
  264.       
  265. The URL has to be split in this way for HTML mode to correctly deal with 
  266. relative URLs within your server.
  267.  
  268. ===============================================================================
  269. = The HTML Packages
  270. ===============================================================================
  271.  
  272. The HTML elements are put into two packages, with can be loaded 
  273. separately.
  274.  
  275. HTML 3.2 - Contains everything in HTML 3.2 as in the specification by World 
  276.            Wide Web Consortium released in June 1996. 
  277.  
  278. Extensions - Contains everything in HTML 3.2 plus Netscape's extensions to 
  279.             HTML. Some of Netscape's extensions are supported by other 
  280.             browsers than Netscape Navigator, such as Mosaic and Internet 
  281.             Explorer.
  282.  
  283. You have probably heard of HTML 3.0.  It was a proposal for extending HTML 
  284. published in March 1995.  HTML 3.0 was never widely deployed.  HTML 3.2 on 
  285. the other hand adds widely deployed features such as tables, applets and 
  286. text flow around images, while providing backwards compatibility with the 
  287. old standard HTML 2.0.
  288.  
  289. ===============================================================================
  290. = How to use tab marks (•)
  291. ===============================================================================
  292.  
  293. When you insert HTML elements via the HTML menu you will see bullet 
  294. characters (•), called tab marks, being inserted after the element.  These 
  295. tab marks are supposed to be a feature.  The way to use them is the 
  296. following: Suppose you want to insert a header H1.  First choose "Header 1" 
  297. from the menu (and give the attribute a value if you want).  In the 
  298. document will now be inserted
  299.  
  300. <H1></H1>
  301.  
  302.  
  303. with the current position between the H1 tags.  Now first type the header 
  304. text:
  305.  
  306. <H1>My header</H1>
  307.  
  308.  
  309. When you have done so, hit tab and the current position will jump to the 
  310. tab mark and delete it.  You are now ready to continue typing.
  311.  
  312. If your document have been cluttered with tab marks, which you do not want 
  313. to use, you can remove them all with cmd-tab.  If you do not want to use 
  314. tab marks at all, you can unset the flag useTabMarks via the menu Config -> 
  315. Current mode -> Flags.  Then they will not be inserted.
  316.  
  317. ================================================================================ 
  318. = Text wrapping 
  319. ================================================================================
  320.  
  321. It is very easy to insert a HTML element in an existing text.  For example, 
  322. suppose there is a word "important" in the text which you want in boldface.  
  323. First select the word, then choose "Bold" from the menu (or type the 
  324. equivalent key binding) and "important" will be wrapped by the HTML tags to 
  325. give <B>important</B>.  This behavior is the same for all elements which 
  326. are containers.  Inserting a HTML element never deletes a selection.
  327.  
  328. ===============================================================================
  329. = Coloring
  330. ===============================================================================
  331.  
  332. The text in your HTML files can be colored in two different ways. By 
  333. default all HTML tags are colored blue, like
  334.  
  335. <A HREF="file.html">a link somewhere</A>
  336.  
  337. By setting the flag JavaScriptColoring the coloring changes. First of all, 
  338. the key words in JavaScript are colored magenta. But the coloring of the 
  339. HTML tags also changes, like
  340.  
  341. <INPUT TYPE="BUTTON" VALUE="pi" onClick="piKnapp(this.form)">
  342.  
  343. While this coloring is primarily intended to be used for files with 
  344. JavaScript, it can also be a better choice for files with very little text 
  345. and almost only HTML tags.  Have in mind though that JavaScript keywords 
  346. (if else this...)  will be colored also when they are part of ordinary 
  347. text.
  348.  
  349. ================================================================================
  350. = Marking the file
  351. ================================================================================
  352.  
  353. If you choose "mark file" in the marks menu, this menu will get a new item 
  354. for each header H1-6 in your file.  You can then easily jump to a header by 
  355. selecting it in the menu.  The menu items are truncated after 30 
  356. characters, to prevent them from becoming too long.
  357.  
  358. ================================================================================
  359. = How HTML mode behaves when it asks for attributes to a HTML element.
  360. ================================================================================
  361.  
  362. If a HTML element has attributes, it can be asked about in two different 
  363. ways, either in a dialog box with all attributes (the default), or in the 
  364. status bar.  The flag useBigWindows determines which of these two ways you 
  365. want to use.  If useBigWindows is set the attributes will be asked about in 
  366. a dialog box (the default), and otherwise in the status bar.
  367.  
  368. The attributes can be divided into seven categories: URLs, colors, target 
  369. windows, predefined choices (for example ALIGN=LEFT|CENTER|RIGHT), numbers, 
  370. flags and other.  The category other contains attributes which can take any 
  371. value plus some which does not fit into any of the other categories.
  372.  
  373. Using dialog boxes.
  374.  
  375. If you set the flag inclEventHandler, JavaScript's event handlers will be 
  376. included in the dialog. By default they are not.
  377.  
  378. URLs     -    You can give the URL in three ways:
  379.             1) type the URL in the text box,
  380.             2) choose one from the menu with your URL cache,
  381.             3) select a file via a file dialog.  (You are only allowed to 
  382.             select a file in your home page folder.)  The file you have 
  383.             selected will be put in the menu.
  384.             
  385.             It is probably much faster to type the URL, than selecting a 
  386.             file from a file dialog, but the advantage about the file 
  387.             dialog is that it will automatically determine the relative 
  388.             path.  If you use a BASE element in the current window it will 
  389.             be noticed, and the relative path will be relative to it.  If 
  390.             you use the file dialog, you must set your home page folder and 
  391.             if you use the BASE element you must also set your server URL 
  392.             (see the section on how to configure HTML mode).  You can only 
  393.             make links to files in the home page folder, or any of its sub 
  394.             folders, because otherwise the relative path would not be possible 
  395.             to determine.
  396.             
  397.             If you type a URL in the text box, it will be used, even if you 
  398.             choose something from the menu.
  399.             
  400. Colors    -    You can give the color in three ways:
  401.             1) type a hexadecimal number #RRBBGG, which defines the color, 
  402.             in the text box,
  403.             2) choose a color from the menu,
  404.             3) define a new color.  The color so defined will be put in the 
  405.             menu.
  406.             
  407.             If you type something in the text box, it will be used, even if 
  408.             you choose a color from the menu.
  409.  
  410. Window    -    You can give the target window in two ways:
  411.             1) type the window name in the text box,
  412.             2) choose a window name from the menu with your window cache.
  413.             
  414.             If you type something in the text box, it will be used, even if 
  415.             you choose a window from the menu.
  416.             
  417. Predefined choices - Select a choice from the menu.
  418.  
  419. Numbers -    Attributes which take an integer value. The numbers will be 
  420.             checked that they are in the valid range.
  421.  
  422. Other    -    Attributes which can take any value.  Note that spaces in the 
  423.             beginning and end of what you type are not removed.  (This is 
  424.             always done otherwise.)  This is because sometimes such spaces 
  425.             are wanted.
  426.  
  427. Flags    -    These are attributes which does not take any value. Check the 
  428.             checkbox to use it.
  429.  
  430. If an element has very many attributes, the dialog box may have to be 
  431. divided into two, or possibly three, pages to fit your screen.  Then there 
  432. will be a menu in the upper left corner of the dialog box to switch between 
  433. the pages.  The dialog box is made as large as possible before being split 
  434. into two or three pages, so if your screen is large enough this will never 
  435. happen.
  436.  
  437. Alpha will complain if you forget a required attribute, or give a value to 
  438. an attribute which is not valid (not true in all cases but there are some 
  439. controls).
  440.  
  441. Using the status bar.
  442.  
  443.     By default not all attributes are asked about. Use the menu Use 
  444.     Attributes to determine which attributes you want to be asked about.
  445.     There you can also set a flag 'Ask for more?'  for each element.  If 
  446.     you answer yes, the following will happen when you are asked about 
  447.     attributes for this element:                
  448.     *) You are first asked about the ones you have selected via this 
  449.     menu.
  450.     *) Then you get a question "More attributes?"    
  451.     *) If you answer yes, you will then be asked about the rest of the 
  452.     attributes.
  453.     The idea is that you can put a kind of half way mark.  First you 
  454.     are asked about the ones you always want to be asked about, and 
  455.     then you are optionally asked about the rest.
  456.  
  457.     If you set the flag inclEventHandler, JavaScript's event handlers will 
  458.     be asked about for those elements you have set 'Ask for more' to yes.
  459.     
  460.     By default, Alpha beeps for each attribute it asks you about. You can turn 
  461.     off the beeps by unsetting the flag promptNoisily.
  462.     
  463.     You can simply type the value you want for an attribute (for colors you 
  464.     can either type a number #RRBBGG or a color name), but some keys 
  465.     have special functions to speed up your work.
  466.     
  467.      tab - If you are asked about an attribute with predefined choices, for 
  468.           example ALIGN=LEFT|CENTER|RIGHT, tab will match what you have 
  469.           typed against your options, and complete what you have typed as 
  470.           much as possible.  Suppose you type C and then tab.  The letters 
  471.           ENTER will then automatically be inserted.
  472.           The same is true if you are asked for a URL, a target window or a 
  473.           color.  Tab will then match against your URL cache, the window 
  474.           cache or the color names defined.
  475.           
  476.     double tab - If there are predefined choices or you are asked for a URL, a 
  477.           color or a target window, double tab will put up a list with 
  478.           everything that match what you have typed so far.  If you for 
  479.           example have forgotten which choices there are, hit double tab 
  480.           without typing anything to get a list with all possible choices.  
  481.           Once you have chosen something from the list, Alpha immediately 
  482.           jumps to ask you about the next attribute.
  483.           
  484.     cmd-v Pastes the clipboard into the status bar. This is most useful if 
  485.           you want to insert a URL which you for example has in another file.
  486.           
  487.     ctrl-f - If you want to select a file via a file dialog, when asked for a 
  488.           URL, or define a new color, when asked for a color, type ctrl-f 
  489.           in the status bar.  Once you have selected a file or defined a 
  490.           new color, Alpha immediately jumps to ask you about the next 
  491.           attribute.
  492.     
  493.     escape - Deletes everything written.
  494.     
  495.     ctrl-z - Cancel everything.
  496.     
  497.     If there are predefined choices, only the letters which match a choice 
  498.     can be typed.  If you type anything else you just get a beep.  Also, if 
  499.     there are predefined choices, and you have typed a unique subset of one 
  500.     of them and hit return, the rest will be added.  For example, if the 
  501.     choices are ALIGN=LEFT|CENTER|RIGHT and you type R and then return, you 
  502.     will get ALIGN=RIGHT. If what you have typed is not unique, the 
  503.     attribute will be skipped.  There are a few cases when two letters are 
  504.     needed to get a unique choice.
  505.     
  506.     Giving no value at all to an attribute means that you skip it.  If you 
  507.     skip a required attribute, no tags will be inserted.
  508.  
  509. ===============================================================================
  510. = Editing JavaScript
  511. ===============================================================================
  512.  
  513. HTML mode has support for editing and coloring of JavaScript.  To use this 
  514. you have to set some flags via the menu Config -> Current mode -> Flags, 
  515. which are not set by default.  The following flags and variables concern 
  516. JavaScript:
  517.  
  518. JavaScriptColoring - when set, key words and comments in JavaScript will be 
  519.                      colored.  The way the HTML tags are colored is also 
  520.                      changed, because the old way does not work well 
  521.                      together with JavaScript.  For the HTML tags to be 
  522.                      colored nicely, all their attributes must be quoted.
  523.                      
  524. elecLBrace    -      when set, the left braces, {, will be electric like in 
  525.                      C mode.
  526.  
  527. elecRBrace    -      when set, the right braces, }, will be electric like 
  528.                      in C mode.
  529.  
  530. JavaScriptColor  -   the color of the key words in JavaScript, if 
  531.                      JavaScriptColoring is set.  Default is magenta.
  532.  
  533. stringColor   -      the color of text between quotes, if 
  534.                      JavaScriptColoring is set.  Default is green.
  535.  
  536. inclEventHandler -     when set, the event handlers (onFocus, onSelect etc.)  
  537.                      will appear in the attribute dialog.  By default they 
  538.                      will not do so.  Set this flag when you are editing 
  539.                      files with JavaScript.
  540.  
  541. If you do not have an American keyboard, you may have to set two key 
  542. bindings to be able to use the electric left and right braces.  For 
  543. example, on my Swedish keyboard { is shift-opt-8 and } is shift-opt-9.  To 
  544. use the electric braces I have to bind these keys with
  545.  
  546. bind '8' <so> electricLeft        HTML
  547. bind '9' <so> electricRight        HTML
  548.  
  549. This is put in HTML's preference file, via the menu Config -> Current 
  550. mode -> Edit prefs. Change your key bindings similarly if needed.
  551.  
  552. ===============================================================================
  553. = The HTML Menu
  554. ===============================================================================
  555.  
  556. The menu described here is the menu for the Extensions package. In the 
  557. smaller package some menu items are absent.
  558.  
  559. The menus are dynamical. Holding down the option key changes some menu 
  560. items.
  561.  
  562. Send file to browser    - Launches your browser and sends the document to it.
  563.  
  564. Help    -        Opens this file.
  565.  
  566. Palette -        Makes a floating palette with the HTML menu.  This palette 
  567.                 will be closed whenever the HTML menu is changed.
  568.  
  569. Packages    -    To choose which package with HTML elements to use.  (See 
  570.                 the section abut the HTML packages.)  If you change 
  571.                 package, the HTML menu is rebuilt.
  572.  
  573. HTML Utilities  -
  574.     Colors    -    You can define and name colors to use as background, text 
  575.                 and link color etc. on your www page.  Later when you insert a 
  576.                 element with a color attribute, you can choose the color 
  577.                 for the attribute from a menu.  A set of eight basic colors 
  578.                 is provided by default.
  579.     
  580.         Reveal color -     If you move the current position to, or select any 
  581.                         part of, a color attribute in the document and then 
  582.                         choose "Reveal color", the number will be replaced 
  583.                         with its name, and if you choose "Reveal color" 
  584.                         again, the number appears again.  This is useful if 
  585.                         you want to know what a cryptic color number stands 
  586.                         for.  Do not forget that the browser only 
  587.                         understands the number so do not leave the name in 
  588.                         the document.
  589.                         
  590.         New color -     To define and name a color, to use as color 
  591.                         attribute.
  592.         
  593.         Change color -    To change a color you have previously defined.  If 
  594.                         you rename it, the old one will be removed.
  595.         
  596.         Remove color -     To remove colors previously defined.
  597.         
  598.                         Have in mind that once you have changed or removed 
  599.                         a color, Alpha does not remember the old one, and 
  600.                         therefore "Reveal color" does not work for it.
  601.  
  602.     Character translation - To translate characters to and from their HTML 
  603.                         entities.
  604.         åäö -> HTML -    translates characters to HTML entities.
  605.         HTML -> åäö -    translates HTML entities to characters.
  606.         
  607.                         The characters which are translated are all you find 
  608.                         in the "small chars" and "capital chars" menus 
  609.                         (except eth, thorn and y´) plus the Spanish ¡ and 
  610.                         ¿.  
  611.                         
  612.                         If some text is selected, the characters are 
  613.                         translated within the selection, otherwise they are 
  614.                         translated in the whole document.
  615.  
  616.     URLs    -    Everything for managing the URL cache.  HTML mode 
  617.                 accumulates a list of the URLs you use in your HREFs SRCs 
  618.                 etc., and saves the list across invocations of Alpha, so it 
  619.                 can help you to put in new URLs rapidly.
  620.                     
  621.         Add selection - Adds the current selection to the URL cache.
  622.         
  623.         Add clipboard - Adds the clipboard to the URL cache.
  624.         
  625.         Clean Up -         After a while the URL cache can get very large, and 
  626.                         you may want to remove some URLs you do not need.  
  627.                         You will be presented with a dialog box with a 
  628.                         checkbox for each URL in your cache.  Uncheck the 
  629.                         ones you want to remove.  Click "Uncheck all" to, 
  630.                         guess what, uncheck all checkboxes.  If there are 
  631.                         more URLs in your cache than fit the window, there 
  632.                         is a button "More" to take you to the next ones.
  633.         
  634.         Clear    -        Removes all URLs from your cache.
  635.         
  636.     Windows -    Everything for managing the window cache.  HTML mode 
  637.                 accumulates a list of the window names you use as target 
  638.                 windows , and saves the list across invocations of Alpha, 
  639.                 so it can help you to put in new window rapidly.
  640.  
  641.         Clean Up -         Works in the same way as Clean up for the URL cache.
  642.         
  643.         Clear    -        Removes all windows from your cache.
  644.                     
  645.     Footers     -    A footer is a file with text which you automatically can 
  646.                 put into the BODY of the document when you create a new 
  647.                 document.  To use this function,
  648.                 *) first create a file with text which you want on many of 
  649.                 your pages, for example, directory buttons, your address 
  650.                 etc.
  651.                 *) then choose "New footer" to define the file to be a footer.
  652.                 
  653.                 When you later use "New document" you can select this file 
  654.                 from a menu, and its content will be put inside the BODY 
  655.                 element.
  656.                 
  657.                 These files can of course contain any kind of text, but I 
  658.                 call them footers because my basic idea is that they should 
  659.                 contain things you put at the bottom of every page.
  660.     
  661.         New footer    -     Presents you with a file dialog to pick a file with 
  662.                         a footer.  This does not insert any text in your 
  663.                         document, it only defines a file to be a footer.
  664.         
  665.         Remove footers - To remove footers previously defined.  Note: this 
  666.                         does not delete the file, it is just no longer a 
  667.                         footer.
  668.         
  669.         Insert footer -    To insert the text in a footer file at the current 
  670.                         position.
  671.         
  672.     Check links in - Functions to scan files in your home page folder and check 
  673.                 that all links, HREFs SRCs etc.  point to files which 
  674.                 exist.  The files which are scanned are the text files in 
  675.                 your home page folder which are HTML files (the ones which 
  676.                 have any of the suffixes as specified by the suffix 
  677.                 mapping).  For this to be useful the files in your home 
  678.                 page folder must be a mirror of the files at your server.  
  679.                 If you use this function as intended you never have to 
  680.                 worry about dead links between your files anymore.
  681.                  
  682.                 To use this function you have to set your Home Page folder 
  683.                 and Server URL. (See the section on how to configure HTML 
  684.                 mode.)
  685.                 
  686.                 It works as follows: In every file scanned Alpha looks for 
  687.                 all HREFs, SRCs etc in the file.  If you use the BASE 
  688.                 element it will be noticed and used to determine where a 
  689.                 link is pointing.  For all links which point to a file in 
  690.                 your home page, Alpha checks if the file exists.  Links 
  691.                 outside your home page are ignored.  If a link includes an 
  692.                 anchor (href="file.html#anchor"), Alpha only checks that 
  693.                 the file exists, not if it contains an anchor with the 
  694.                 correct name.
  695.                 
  696.                 If any invalid links are found, which points to files which 
  697.                 not exists, a window is opened where the lines look as 
  698.                 follows:
  699.     
  700.     file.html                   ; Line 8:    HREF="otherfile.html"
  701.     folder:file2.html           ; Line 17:    (BASE used) SRC="pic/coolpic.gif"
  702.     
  703.                 In the first column is the name of the file with the link, 
  704.                 including the path relative to your home page folder.  In 
  705.                 the second column is the line number where the invalid link 
  706.                 is, and in the third column is the link itself.  If it says 
  707.                 (BASE used) it means that the file contains a BASE element.  
  708.                 Use the up and down arrows to select a line in this window, 
  709.                 and carriage return to open the file and select the line 
  710.                 with the invalid link.
  711.                 
  712.                 Limitation: If a link is within a comment, <!-- -->, it is 
  713.                 still checked.
  714.         
  715.         home page     -     Check links in all html files in the home page 
  716.                         folder and its sub folders.
  717.         
  718.         folder -         To check links in all files in one folder.  The sub 
  719.                         folders are not scanned.  If you have very many 
  720.                         files, you may want to scan one folder at a time.
  721.         
  722.         file     -        To check links in a single file.    
  723.         
  724.     Extend     -    To add new HTML elements, or new attributes to existing 
  725.                 element, to HTML mode.  HTML is continuously evolving and 
  726.                 many browsers have introduced their own extensions.  Here 
  727.                 you can add what is missing.  New elements will be put in a 
  728.                 new submenu 'Custom' of the HTML menu.
  729.                 
  730.                 You can only add new elements to the extensions package.  
  731.                 HTML 3.2 is complete as it is.
  732.                     
  733.                 IMPORTANT! If you have previously defined new HTML elements 
  734.                 in the preferences file HTMLPrefs.tcl, make sure you remove 
  735.                 all of them and restart Alpha before using this function.  
  736.                 Otherwise there is a risk for conflicts between the two 
  737.                 ways of adding elements.  If you have element definitions 
  738.                 in your prefs file and you already have loaded HTML mode, 
  739.                 you may have seen a warning message that the way to add new 
  740.                 elements has changed.  This warning message is shown if you 
  741.                 call the function htmlNewElemVar of define the variable 
  742.                 htmlCustomMenuList.  Remove all such things from the prefs 
  743.                 file and restart Alpha to avoid this warning.
  744.                 
  745.         New element -     To add a new HTML element.
  746.         
  747.                         The elements are divided into three categories.
  748.                         *) Normal.  All which are not of one of the other 
  749.                         two categories.
  750.                         *) Input element.  A <INPUT TYPE="xxx"> element for 
  751.                         forms.
  752.                         *) Plug-in. A plug-in using <EMBED>.
  753.                         
  754.                         In the first dialog you specify the following.
  755.                         *) The name of the element.
  756.                            For 'normal' elements simply give the name, for 
  757.                            example to define <IMG> you would use 'IMG'.
  758.                            For 'input elements' give the type, for example 
  759.                            to define <INPUT TYPE=CHECKBOX> use 'CHECKBOX'.
  760.                            For 'plug-ins', use any descriptive name you 
  761.                            like.      
  762.                         *) If the element has a closing tag </TAG> or 
  763.                            not.  This only applies to 'normal' ones as 
  764.                            neither <INPUT> nor <EMBED> has a closing tag.
  765.                         *) A key binding for the element.  Type one 
  766.                            character in the text box, and select which of the 
  767.                            modifiers shift, control, option and command you 
  768.                            want.  It is no good idea to choose a key binding 
  769.                            which conflicts with another one, but if it turns 
  770.                            out that you have made a bad choice you can change 
  771.                            it later.  If you do not want any key binding, 
  772.                            leave the text box blank.
  773.                         
  774.                         Next you are asked to specify all the attributes to 
  775.                         the element.  (I would say that it is a good idea to 
  776.                         write down the complete definition on a piece of 
  777.                         paper before you start.)
  778.                         
  779.                         In the first dialog for each attribute you specify:
  780.                         *) Its name.
  781.                         *) If it is a required attribute or not.
  782.                         *) Its type.  Make sure you specify the correct 
  783.                         type for each attribute.  For some types additional 
  784.                         information must be given.  This is explained in 
  785.                         detail below.
  786.                         
  787.                         The attributes you define will be displayed in the
  788.                         dialog window as you go along.
  789.                         
  790.                         Then click
  791.                         *) OK when you have given the above information for the 
  792.                         current attribute.
  793.                         *) 'No more attributes' *after* you have clicked OK 
  794.                         for the last attribute.
  795.                         *) 'Remove last' to remove the last attribute you just 
  796.                         defined. You can remove them all one after another
  797.                         to correct a mistake somewhere. 
  798.                         
  799.                         The different types are
  800.                         
  801.                         *) 'Other'.  Attributes that can take any value or 
  802.                         do not fit into any of the other seven 
  803.                         categories.  No additional information is needed.
  804.                         
  805.                         *) 'Number'.  Attributes which take an integer 
  806.                         value.  For these, a second dialog box is shown, 
  807.                         where you must specify the range of values 
  808.                         accepted.  A minimum value must be given, but if 
  809.                         there is no maximum value, leave the text box for 
  810.                         this blank.  You should also specify if the value 
  811.                         may be given in percent or not.
  812.                         
  813.                         *) 'Choices'.  Attributes which can only take 
  814.                         certain predefined choices, such as 
  815.                         ALIGN=LEFT|CENTER|RIGHT. For these attributes you 
  816.                         must specify all valid choices in a second dialog 
  817.                         box. The choices you define will be displayed in the
  818.                         dialog window as you go along.
  819.                           Click 
  820.                         *) 'OK' for each choice
  821.                         *) 'No more choices' *after* you have clicked OK for the 
  822.                         last one.
  823.                         *) 'Remove last' to remove the last choice you just 
  824.                         defined. You can remove them all one after another
  825.                         to correct a mistake somewhere. 
  826.                         
  827.                         *) 'Flag'.  Attributes which are flags and don't 
  828.                         take any value, like ISMAP for <IMG> or NOHREF for 
  829.                         <AREA>.  These attributes will be checkboxes in the 
  830.                         attribute dialog.  No additional information is 
  831.                         needed.
  832.                         
  833.                         *) 'URL'.  Attributes which take a URL as value, like
  834.                         HREF, SRC etc. No additional information is needed.
  835.                         
  836.                         *) 'Color'.  Attributes which take a color as 
  837.                         value.  No additional information is needed.
  838.                         
  839.                         *) 'Window'.  Attributes which take a target window 
  840.                         as value, like the attribute TARGET. No additional 
  841.                         information is needed.
  842.         
  843.                         *) 'Event handler'.  Attributes which are event 
  844.                         handlers for JavaScript.  No additional information 
  845.                         is needed.
  846.                         
  847.                         Once you have specified all attributes you will be 
  848.                         presented with a final dialog box, where you are 
  849.                         asked which layout you want in the html documents.  
  850.                         (This layout only determines how the tags are 
  851.                         inserted in te text document, and affects, of 
  852.                         course, not how the text is displayed by the 
  853.                         browser.)
  854.                         For elements without a closing tag you can specify 
  855.                         if you always want a carriage return inserted 
  856.                         before and/or after the tag.
  857.                         
  858.                         For elements with a closing tag, you can choose 
  859.                         between four different layouts, whether you want 
  860.                         the tags to be on lines of their own and if you 
  861.                         want blank lines before and after them.
  862.                         
  863.                         The new element is now saved, and after that, if 
  864.                         you use the status bar to input attributes, you 
  865.                         will be asked to select which optional attributes 
  866.                         you want to be asked about (as described here).
  867.                                                 
  868.         New attributes - To add new attributes to an existing HTML element.  
  869.                         You are first presented with a list from which you 
  870.                         choose an element to add attributes to.  In this 
  871.                         list LI IN UL and LI IN OL are the LI element for 
  872.                         UL and OL lists respectively.  BUTTON, CHECKBOX, 
  873.                         FILE, HIDDEN, IMAGE, PASSWORD, RADIO, RESET, SUBMIT 
  874.                         and TEXT are the INPUT element with different 
  875.                         TYPEs.  LIVEAUDIO, LIVEVIDEO, QUICKTIME MOVIE, 
  876.                         QUICKTIME VR and REALAUDIO are different plug-ins.  
  877.                         All the rest are the usual names of the elements.  
  878.                         Then you specify the attributes in the same way as 
  879.                         you specify the attributes to a new element as 
  880.                         described above.
  881.         
  882.         New choices    -    To add new choices to an attribute with predefined 
  883.                         choices.  You are first presented with a list from 
  884.                         which you choose the element with the attribute to 
  885.                         add to.  Second you are presented with a list from 
  886.                         which you select the attribute.  Then you specify 
  887.                         new choices in the same way as described above.
  888.         
  889.         Change key binding - To change a key binding for a custom element.  
  890.                         To remove the key binding, leave the text box 
  891.                         blank.  Note that you can only change the key 
  892.                         bindings for the elements you have added yourself.
  893.                         
  894.         Change type and layout - To change the layout of a custom element, 
  895.                         to change whether it has a closing tag or not, and 
  896.                         to change its type (normal, input element or 
  897.                         plugin).
  898.         
  899.         Remove attributes - To remove one or more of the attributes you have 
  900.                         added to some element, or to remove choices you 
  901.                         have added to an attribute.  You are first 
  902.                         presented with a list of all elements you have 
  903.                         added attributes to.  Select the element you want 
  904.                         and you are then presented with a list with all 
  905.                         attributes you have added to this element, where you 
  906.                         can select the ones you want to remove.  If you 
  907.                         have only added new choices to an attribute, only 
  908.                         these choices are removed, not the attribute 
  909.                         itself.
  910.                         
  911.                         There is no function to directly change an 
  912.                         attribute.  (This is something I, most likely, will 
  913.                         add to the next version of HTML mode.)  To change 
  914.                         an attribute you have to first remove it and then 
  915.                         add a new one again.
  916.         
  917.         Remove additions - To remove an element you have added or to remove 
  918.                         additions you have made to a predefined element.  
  919.                         With this function you remove all additions you 
  920.                         have made to an element.
  921.         
  922.     Select Container -    Selects matching tags which include the current 
  923.                 position or selection.  Repeated, it expands the selection.  
  924.                 Like the "Balance" item under the Edit menu.  All tags 
  925.                 without a corresponding closing tag are ignored.
  926.             
  927. <opt>Select Opening     -    If the first tag to the left of the current position 
  928.                 is a tag without a corresponding closing tag, it is 
  929.                 selected.  Repeated it jumps to the next one.
  930.  
  931.     Untag    -    Removes a tag pair surrounding the current position or 
  932.                 selection.  All tags without a corresponding closing tag 
  933.                 are ignored.
  934.                 
  935. <opt>Untag and Select - Same as Untag, but the text inside the container is 
  936.                 selected.  Use this if you want to change one container to 
  937.                 another.
  938.                 
  939.     Remove opening - If the first tag to the left of the current position 
  940.                 is a tag without a corresponding closing tag, it is 
  941.                 removed.
  942.                 
  943.     Change container - To change the attributes of the element enclosing the 
  944.                 current position or selection.  A dialog box appears 
  945.                 where the current values of all attributes are shown.  
  946.                 Change the ones you want and a new tag will be inserted in 
  947.                 the text.  
  948.                 
  949.                 If the element you want to change contains anything HTML 
  950.                 mode does not understand, a warning message will first be 
  951.                 shown.  If you decide to insert a new tag, everything HTML 
  952.                 mode does not understand will be removed.  
  953.                 
  954.                 If you are using JavaScript, the event handlers will only 
  955.                 be shown in the dialog if the flag inclEventHandler is set.
  956.                 If inclEventHandler is not set, the event handlers are left
  957.                 untouched in the document.
  958.                 
  959. <opt>Change opening - Same as change container, but for an element with no 
  960.                 closing tag.  The tag must be the first one to the left of 
  961.                 the current position to be found.
  962.                 
  963.                 As you probably have noticed the logic for finding tags is 
  964.                 the same for "Select" "Untag/Remove" and "Change".
  965.                 *) Container: the tags enclosing the current position or 
  966.                 selection.  All tags without a corresponding closing tag 
  967.                 are ignored.
  968.                 *) Opening: the first tag to the left must be a tag without 
  969.                 a corresponding closing tag.
  970.                 
  971.                 It can be a good idea to first select the container or 
  972.                 opening tag, before removing or changing them, to make sure 
  973.                 you select the one you want.
  974.  
  975.     Remove marks - Remove tab marks, (•).  If some text is selected, the tab 
  976.                 marks are removed within the selection, otherwise they are 
  977.                 removed in the whole document.
  978.                     
  979.     Move files - To move files between different folders and automatically 
  980.                 update all links, which points to any of these files, in 
  981.                 every file in your home page folder, as well as updating 
  982.                 all links in the files moved.
  983.     
  984.                 To use this function you have to set your Home Page folder 
  985.                 and Server URL. (See the section on how to configure HTML 
  986.                 mode.)
  987.  
  988.                 *) First you are asked to select the folder which contains 
  989.                 the files you want to move.
  990.                 *) Then you are asked to select the files you want to move 
  991.                 from this folder.                
  992.                 *) And then you are asked to select the destination folder.
  993.                 
  994.                 Alpha now moves the files, and then asks you if you want to 
  995.                 update all links (this is the whole point of this function, 
  996.                 so a 'yes' should be appropriate).  Alpha now scans all 
  997.                 HTML files (as determined by the suffix mapping) in your 
  998.                 home page folder and changes the links which need to be 
  999.                 changed.  This may take a little while if you have very 
  1000.                 many files, but should in most cases be a lot faster than 
  1001.                 to make the changes manually.
  1002.                 
  1003.                 Limitation: Links within comments , <!-- -->, are also 
  1004.                 updated (which is a bug or a feature, depending on how you see 
  1005.                 it).
  1006.     
  1007.     Set Server URL - Set the URL to your server.  See the section on how to 
  1008.                 configure HTML mode.
  1009.  
  1010. Use Attributes    - If you choose to input attributes from the status bar, you 
  1011.                 can select which ones you want to be asked about.  If you 
  1012.                 choose to be asked about attributes in a dialog box you 
  1013.                 will always be asked about everyone.
  1014.                                 
  1015.                 Note: This menu is disabled if you choose to input 
  1016.                 attributes in a dialog box with all attributes (the 
  1017.                 default).
  1018.  
  1019.                 For inputting attributes in the status bar, HTML mode is by 
  1020.                 default set to ask about the ones which I think is the most 
  1021.                 popular ones.  If you choose to use the status bar 
  1022.                 to input attributes I recommend that you go through the 
  1023.                 list and choose the ones you want.  In this list LI IN UL 
  1024.                 and LI IN OL are the LI element for UL and OL lists 
  1025.                 respectively.  BUTTON, CHECKBOX, FILE, HIDDEN, IMAGE, 
  1026.                 PASSWORD, RADIO, RESET, SUBMIT and TEXT are the INPUT 
  1027.                 element with different TYPEs.  LIVEAUDIO, LIVEVIDEO, 
  1028.                 QUICKTIME MOVIE, QUICKTIME VR and REALAUDIO are different 
  1029.                 plug-ins.  All the rest are the usual names of the 
  1030.                 elements.
  1031.                 
  1032.                 There is also a question "Ask for more?" If you answer yes, 
  1033.                 the following will happen when you are asked about 
  1034.                 attributes for this element:
  1035.                 *) You are first asked about the ones you have selected via 
  1036.                 this menu.
  1037.                 *) Then you get a question "More attributes?"
  1038.                 *) If you answer yes, you will then be asked about the rest 
  1039.                 of the attributes.
  1040.                 The idea is that you can put a kind of half way mark.  
  1041.                 First you are asked about the ones you always want to be 
  1042.                 asked about, and then you are optionally asked about the 
  1043.                 rest.
  1044.                 
  1045.                 Note: The settings only affect the current HTML package.  
  1046.                 You have to set everything for both packages even if an 
  1047.                 element is in both of them.  This is because some elements 
  1048.                 have different attributes in the different packages.
  1049.                         
  1050. New document -    To insert the elements HTML, HEAD, TITLE, BODY in a new 
  1051.                 HTML document.  If you have a text file which you want to 
  1052.                 make a HTML file of, this function lets you put the text 
  1053.                 into the document's BODY element.  Before choosing "New 
  1054.                 document", open a new empty window or a text file which you 
  1055.                 want to make a HTML document of.
  1056.  
  1057.                 First a dialog box is presented where you can:
  1058.                 *) give the document a title, 
  1059.                 *) choose elements you want, which can be in the HEAD. 
  1060.                 (These elements can of course be inserted later.)
  1061.                 *) choose a footer which is inserted in the end of the BODY 
  1062.                 element.  You define a file to be a footer via the menu 
  1063.                 Footers.
  1064.                 
  1065.                 When you are finished with the first dialog box 
  1066.                 you are then asked about attributes for each element you 
  1067.                 have chosen to put in the HEAD, and finally you are asked 
  1068.                 about attributes for the BODY element.  
  1069.                 
  1070.                 The elements <HTML>, <HEAD>, <TITLE>, your chosen ones, and 
  1071.                 <BODY> are now inserted in the text.  If there were text in 
  1072.                 the document, it is put in the BODY before the text in the 
  1073.                 footer.
  1074.  
  1075. Now comes the part of the menu with all HTML elements.  Some of the menu 
  1076. items for the elements are dynamical.  Hold down the option key and you see 
  1077. that some menu items change.  The new ones which appear insert the same 
  1078. element as the other ones but with all attributes automatically skipped.  
  1079. ("No attr" in the menu stands for "no attributes").  The elements which 
  1080. this concerns are <H1>-<H6>, <P>, <DIV>, <BR>, <HR>, <UL>, <OL>, <TR>, <TH> 
  1081. and <TD>.  This can be very useful if you for example are making a table 
  1082. and only for a few cells want to set some attributes.
  1083.  
  1084. Headers    -        Insert section headers, from H1 to H6.
  1085.  
  1086.     Header n  -    <Hn>.
  1087. <opt> Hn no attr -    <Hn> without attributes.
  1088.  
  1089. Blocks and Dividers    -    These are various text-blocks and elements to control
  1090.                 line breaks. 
  1091.                 
  1092.     Insert line breaks - Insert a <BR> tag at the end of each line in a 
  1093.                 selection.  To use this, first select the text where you 
  1094.                 want the <BR> tags.
  1095.     
  1096. <opt>Remove line breaks - Removes all <BR> elements in a selection (not only 
  1097.                 the ones at end of lines).  To use this, first select the 
  1098.                 text where you want to remove the <BR> tags.
  1099.                 
  1100.     Insert paragraphs -    Insert <P> elements at each empty line in a selection, 
  1101.                 and one just before the selection.  To use this, first 
  1102.                 select the text where you want the <P> elements.
  1103.                 
  1104.     Paragraph     -    <P>
  1105. <opt>P no attr     -     <P> without attributes.
  1106.     Division     -    <DIV>
  1107. <opt>DIV no attr -     <DIV> without attributes.
  1108.     Block quote -     <BLOCKQUOTE>
  1109.     Address        -    <ADDRESS>
  1110.     Center        -    <CENTER>
  1111.     Preformatted -    <PRE>
  1112.     Multi column -    <MULTICOL>
  1113.     Spacing        -    <SPACER>
  1114.     Line break    -    <BR>
  1115. <opt>BR no attr -    <BR> without attributes.
  1116.     Horizontal rule - <HR>
  1117. <opt>HR no attr    -    <HR> without attributes.
  1118.     No linebreak -    <NOBR>
  1119.     Word break    -    <WBR>
  1120.     
  1121. Styles    -        Elements for different text styles.  The ones above the 
  1122.                 line in the middle of the menu are physical styles, while 
  1123.                 the other ones are logical styles.
  1124.     
  1125.     Font        -    <FONT>
  1126.     Basefont    -    <BASEFONT>
  1127.     Bold        -    <B>
  1128.     Italic        -    <I> 
  1129.     Strike out    -    <STRIKE>
  1130.     Underlined    -    <U>
  1131.     Superscript -    <SUP>
  1132.     Subscript    -    <SUB>
  1133.     Bigger        -    <BIG>
  1134.     Smaller        -    <SMALL>
  1135.     Typewriter    -    <TT>
  1136.     Blinking    -    <BLINK>
  1137.     Emphasis    -    <EM>
  1138.     Strong        -    <STRONG>
  1139.     Definition    -    <DFN>
  1140.     Code        -    <CODE>
  1141.     Variable    -    <VAR>
  1142.     Citation    -    <CITE>
  1143.     Keyboard    -    <KBD>
  1144.     Sample        -    <SAMP>
  1145.  
  1146. Links    -        Hypertext links to and from other points, plus images.
  1147.     Link or Anchor - <A>
  1148.     Image        -    <IMG>
  1149.  
  1150. Plug-ins  -        Different plug-ins all using <EMBED>
  1151.     General        -     General <EMBED> tag.
  1152.     LiveAudio etc. -  Plug-ins with more attributes to <EMBED>.
  1153.     No embed    -    <NOEMBED>
  1154.     
  1155. Lists    -        All kinds of lists. 
  1156.  
  1157.     Make list    -    Makes list item , <LI>, of the text in a selection.  If 
  1158.                     your, for example, have a list 
  1159.                     
  1160.                     * item one
  1161.                     * item two 
  1162.                     * item two
  1163.                     and a half
  1164.                     * item three
  1165.                     
  1166.                     you can make HTML list items of them.  First select the 
  1167.                     lines with the items, before you choose "Make list" 
  1168.                     from the menu.  You are then asked about a string with 
  1169.                     which all list items must begin, is this case *.  You 
  1170.                     cannot transform a list where the items begins with 1), 
  1171.                     2) etc.  All items must begin with the same string.  
  1172.                     The result in this case will be
  1173.                     
  1174.                     <LI>item one
  1175.                     <LI>item two
  1176.                     <LI>item two
  1177.                     and a half
  1178.                     <LI>item three
  1179.                     
  1180.                     The element for the list itself is not inserted.  The 
  1181.                     idea is that you should be able to put new items into 
  1182.                     an existing list in this way.  To insert the list 
  1183.                     element, select all items and make a list with zero 
  1184.                     items.
  1185.     
  1186.     Bulleted    -    <UL> list.
  1187. <opt>UL no attr    -    <UL> without attributes.
  1188.     New bulleted item - <LI> with attributes corresponding to an <UL> list.
  1189.     Ordered        -    <OL> list.
  1190. <opt>OL no attr    -    <OL> without attributes.
  1191.     New ordered item -    <LI> with attributes corresponding to an <OL> list.
  1192.     Directory    -    <DIR> list.
  1193.     Menu        -    <MENU> list.
  1194.     New list item -    <LI> without attributes.
  1195.     Discursive    -    <DL> list.
  1196.     New discursive entry -    <DT> and <DD>
  1197.     
  1198.     When you make a list you are first asked how many items you want, and 
  1199.     in some cases if you want to be asked about attributes for each list 
  1200.     item.  You are then asked about attributes for the list element, and 
  1201.     finally, if you have said so, about attributes for each list item.
  1202.     
  1203. Forms    -        The elements for building forms.
  1204.  
  1205.     Form        -    <FORM>
  1206.     Text        -    <INPUT TYPE=TEXT>
  1207.     Checkbox    -    <INPUT TYPE=CHECKBOX>
  1208.     Button        -    <INPUT TYPE=BUTTON>
  1209.     Radio        -    <INPUT TYPE=RADIO>
  1210.     Submit        -    <INPUT TYPE=SUBMIT>
  1211.     Reset        -    <INPUT TYPE=RESET>
  1212.     Password    -    <INPUT TYPE=PASSWORD>
  1213.     Hidden        -    <INPUT TYPE=HIDDEN>
  1214.     Image        -    <INPUT TYPE=IMAGE>
  1215.     File upload    -    <INPUT TYPE=FILE>
  1216.     Select        -    <SELECT>
  1217.     Option        -    <OPTION>
  1218.     Textarea    -    <TEXTAREA>
  1219.     
  1220. Tables    -        The elements for building tables.
  1221.  
  1222.     Table template - A function to easily build a table if it does not have 
  1223.                     too complicated structure.  You are presented with a 
  1224.                     dialog box where you can specify:
  1225.                     *) the number of rows and columns you 
  1226.                     want.  
  1227.                     *) if you want table headers (TH) in the first row 
  1228.                     and/or the first column.  The rest will be table cells 
  1229.                     (TD).
  1230.                     *) vertical and horizontal alignment for the rows.  
  1231.                     These are attributes to the TR element and will be the 
  1232.                     same for all rows.
  1233.                     
  1234.                     When you are finished with this dialog box, you will be 
  1235.                     asked about the attributes for the TABLE element, 
  1236.                     before everything inserted in the document.
  1237.                       
  1238.                     You cannot use this function to build more complicated 
  1239.                     tables which requires attributes such as ROWSPAN and 
  1240.                     COLSPAN.
  1241.     
  1242.     Tabs to Rows -    Takes a tab-delimited table and make HTML table rows of 
  1243.                     them.  To use this, first select the text to make table 
  1244.                     rows of before you choose "Tabs to Rows" from the menu.
  1245.                     
  1246.                     You will first be asked about attributes for 
  1247.                     the table row (TR) element.  These attributes will be 
  1248.                     used for every row.  
  1249.                     
  1250.                     Then you are asked if you want table headers in the 
  1251.                     first row and/or the first column.
  1252.                     
  1253.                     Example: If you have the lines
  1254.                     
  1255. a    b    c
  1256. d    e    f
  1257.                     in your document, "Tabs to Rows" will transform them into
  1258.                     
  1259. <TR>
  1260. <TD>a</TD><TD>b</TD><TD>c</TD>
  1261. </TR>
  1262.  
  1263. <TR>
  1264. <TD>d</TD><TD>e</TD><TD>f</TD>
  1265. </TR>
  1266.                       
  1267.                     Do not put more than one tab between each table cell.  
  1268.                     Alpha makes one table cell for each tab in each row.  
  1269.                     The TABLE element is not inserted.  The idea is that 
  1270.                     you should be able to insert new rows in an existing 
  1271.                     table in this way.
  1272.                     
  1273.                     It can be useful to change the tab size before using 
  1274.                     this function.
  1275.  
  1276. <opt>Rows to Tabs - Converts table rows in a selection to a tab-delimited 
  1277.                     format.  (This is exactly "Tabs to Rows" backwards.)  
  1278.                     To use this, first select the table rows you want to 
  1279.                     convert.  This function will remove the elements TR, TH 
  1280.                     and TD, and put one tab between each table cell.  
  1281.                     Everything in each table row will be put on one line.  
  1282.                     If the table contains cells of varying length you may 
  1283.                     have to change the tab size for the table to look 
  1284.                     pretty.
  1285.     
  1286.     Table        -    <TABLE>
  1287.     Row            -    <TR>
  1288. <opt>TR no attr -    <TR> without attributes.
  1289.     Header        -    <TH>
  1290. <opt>TH no attr    -    <TH> without attributes.
  1291.     Cell        -    <TD>
  1292. <opt>TD no attr    -    <TD> without attributes.
  1293.     Caption        -    <CAPTION>
  1294.  
  1295. Frames  -        The elements for building frames. 
  1296.     
  1297.     New doc. with frames - The same as New document, with the difference 
  1298.                     that BODY is replaced by FRAMESET.
  1299.     
  1300.     Frameset    -    <FRAMESET>
  1301.     Frame        -    <FRAME>
  1302.     No frames    -    <NOFRAMES>
  1303.  
  1304. Image maps -    The elements for client side image maps.
  1305.  
  1306.     Map            -    <MAP>
  1307.     Area        -    <AREA>
  1308.  
  1309. Java    -         The elements for Java and JavaScript.
  1310.  
  1311.     Applet        -    <APPLET>
  1312.     Parameter    -    <PARAM>
  1313.     Script        -    <SCRIPT>
  1314.     No script     -    <NOSCRIPT>
  1315.  
  1316. Other     -        Things which do not fit elsewhere. 
  1317.  
  1318.     Comment        -    Inserts a HTML comment <!-- -->
  1319.     Base        -    <BASE>
  1320.     Isindex        -    <ISINDEX>
  1321.     Link        -    <LINK>
  1322.     Meta        -    <META>
  1323.     Comment line -    Inserts a commented line with = signs.  Use it if you 
  1324.                     want to divide the document into different parts. The
  1325.                     key binding for this is ctrl-C-L.
  1326.  
  1327. Character Entities    - The entities for characters, for example ü is ü.  
  1328.                 All possible entities are divided into three submenus.  To 
  1329.                 pick a character from these menus is only useful if you 
  1330.                 only want a single character.  If you write in a language 
  1331.                 which use a lot of these characters, type them in the 
  1332.                 document as usual and then use the character translation.
  1333.                 
  1334.     Add     -        Letters can be added to the short list at the top.
  1335.                     Choose the ones you want from a list pick.
  1336.                     
  1337.     Default -        Sets the short list at the top back to the default 
  1338.                     setting, less than, greater than, ampersand.
  1339.     
  1340.     Clear    -        Removes all letters from the short list.
  1341.                         
  1342.     small chars -    Inserts the character entity for a letter, for example, 
  1343.                     á inserts á.
  1344.                     
  1345.     capital chars -    Inserts the character entity for a capital letter.
  1346.     
  1347.     other chars    -    Character entities for other characters.
  1348.     
  1349.      The reason for the accent being beside some letters is that the font 
  1350.      used in the menus, Chicago, does not have these accented letters.
  1351.  
  1352. ================================================================================
  1353. = Key Bindings
  1354. ================================================================================
  1355.  
  1356. All HTML elements have got their own key bindings.  You can find them all in 
  1357. the HTML menu.  I have tried to group them as much as possible so that they 
  1358. are easy to learn.
  1359.  
  1360. Some of the key bindings:
  1361.  
  1362. tab         Jump to the next tab mark (•)
  1363. shift-tab    Jump to the previous tab mark (•)
  1364. opt-tab        Literal tab
  1365. cmd-tab     Remove all •
  1366.  
  1367. shift-ctl-opt-,     inserts <
  1368. shift-ctl-opt-.        inserts >
  1369. shift-ctl-opt-7        inserts &
  1370.  
  1371. All other key bindings can be found in the menu.
  1372.  
  1373. ===============================================================================
  1374. = Command-double-click
  1375. ===============================================================================
  1376.  
  1377. Command-double-clicking on an absolute URL sends the URL to your web 
  1378. browser.  This is not specific for the HTML mode, it is a general feature 
  1379. of Alpha.
  1380.  
  1381. Command-double-clicking on a relative URL opens a new window with the file 
  1382. if the file exists in your home page folder and it is a text file.  If it 
  1383. does not exist, a new empty window can be opened with the name of the file.  
  1384. This window is automatically saved in the right place, and if necessary new 
  1385. folders are created.  Thus, if you are making a new set of pages, you can 
  1386. make links to the ones you have not written yet, and then by 
  1387. cmd-double-clicking let Alpha make empty files which are saved where you 
  1388. want them.
  1389.  
  1390. ================================================================================
  1391. = User-Settable Flags and Variables
  1392. ================================================================================
  1393.  
  1394. HTML mode is highly customizable.  You can modify its behavior in several 
  1395. ways.  Most of the flags and variables are discussed in other places in 
  1396. this manual, in the context where they are used.
  1397.  
  1398. Flags
  1399.  
  1400. The flags can be set in the menu Config -> Current mode -> Flags...
  1401.  
  1402.     JavaScriptColoring    -    if set, key words and comments in JavaScript will be 
  1403.                             colored.  The way the HTML tags are colored is 
  1404.                             also changed, because the old way do not work 
  1405.                             well together with JavaScript.  The default is 
  1406.                             0, do not color JavaScript's key words.
  1407.                          
  1408.     browseInForeground    -    if set, when you send a file to the browser, the
  1409.                             browser will be brought to the foreground.  If you
  1410.                             have lots of screen space and are just validating,
  1411.                             uncheck this flag to leave the browser in the
  1412.                             background and Alpha in the foreground.  The 
  1413.                             default is 1, bring browser to foreground.
  1414.                             
  1415.     elecLBrace    -     when set, the left braces, {, will be electric like 
  1416.                         in C mode.  Set this if you are editing JavaScript.  
  1417.                         The default is 0, { is not electric.
  1418.  
  1419.     elecRBrace    -        when set, the right braces, }, will be electric 
  1420.                         like in C mode.  Set this if you are editing 
  1421.                         JavaScript.  The default is 0, } is not electric.
  1422.  
  1423.     
  1424.     lidtAreContainers    -    If set, <LI>, <DT> and <DD> have 
  1425.                         corresponding closing tags.  If not set the optional 
  1426.                         closing tags are skipped.  The default is 0, do not 
  1427.                         insert a closing tag.
  1428.                         
  1429.     inclEventHandler -  when set, the event handlers (onFocus onSelect 
  1430.                         etc.)  will appear in the attribute dialog.  The  
  1431.                         default is 0, no event handlers in attribute dialog.
  1432.     
  1433.     pIsContainer    -    If set, the <P> element has a corresponding closing tag. 
  1434.                         If not set it does not. The default is 1, it has a
  1435.                         closing tag.
  1436.  
  1437.     promptNoisily    -    If you input element attributes from the status 
  1438.                         bar, Alpha will beep when asking for element 
  1439.                         attribute information there.  The default is 1, do 
  1440.                         beep.  The value of this flag is only used if 
  1441.                         useBigWindows is not set.
  1442.  
  1443.     useBigWindows    -    If set, element attributes will be asked about in a 
  1444.                         a dialog box with all attributes, otherwise they 
  1445.                         will be asked about in the status bar.  The default 
  1446.                         is 1, use dialog boxes.
  1447.                         
  1448.     useLowerCase    -    If set, elements will be like <P>; if 1, like <p>.  
  1449.                         The default is 0, upper case.
  1450.  
  1451.     useTabMarks        -    If set , will not insert the • characters.  The
  1452.                         default is 1, to insert them.
  1453.  
  1454.                             
  1455. Variables
  1456.  
  1457. The variables can be set in the menu Config -> Current mode -> Flags...
  1458.  
  1459.     prefixString    -    The string to begin a comment, and the one to 
  1460.     suffixString    -    end a comment.  Change these if you want to make 
  1461.                         comments in JavaScript, but do not forget to change 
  1462.                         them back when you want to make a HTML comment 
  1463.                         again.
  1464.  
  1465.     JavaScriptColor -    The color of keywords in JavaScript.  These are 
  1466.                         only colored if the flag JavaScriptColoring is set.
  1467.                         The default is magenta.
  1468.     
  1469.     stringColor        -    The color of everything between quotes.  Only used 
  1470.                         if the flag JavaScriptColoring is set.
  1471.                         The default is green.
  1472.     
  1473.     tagColor        -     The color of the HTML tags. 
  1474.                         The default is blue.
  1475.                         
  1476.     wordBreak            - These two control which characters build up words,
  1477.     wordBreakPreface     - 
  1478.     wrapBreak            - and these ones control word wrapping.
  1479.     wrapBreakPreface    -
  1480.                         Read about them in the general manual if you want to 
  1481.                         change them (should usually not be needed).
  1482.  
  1483. Internal variable which you may change
  1484.  
  1485.     HTMLwords        -    keywords which you want to be highlighted when 
  1486.                         editing HTML in Alpha.  They are colored with the 
  1487.                         same color as the HTML elements.  If you want the 
  1488.                         words "cool" and "nifty" to be highlighted, add the 
  1489.                         following to your preferences file:
  1490.                 
  1491.             lappend HTMLwords cool nifty
  1492.             htmlColorizing
  1493.             
  1494.                         The first line defines the words, and the second one
  1495.                         tells Alpha to color them.
  1496.                         The default is {}, i.e. no keywords.
  1497.  
  1498. Defining your own key bindings.
  1499.                         
  1500. It is possible to change the key bindings by using the Alpha "bind" command.  
  1501.  
  1502. Here are some simple bindings, included as samples of what is possible.  
  1503. For example, if you don't use an American keyboard, you maybe want to
  1504. change the bindings for < > and & to where they actually are on 
  1505. your keyboard. For example, to get it right on my Swedish keyboard I put 
  1506. the following lines in my preferences file.
  1507.  
  1508.     bind '<'    <o>        {insertText "<\;"} HTML
  1509.     bind '<'    <so>    {insertText ">\;"} HTML
  1510.     bind '6'    <so>    {insertText "&\;"} HTML
  1511.     
  1512. Read more about how to define your own key bindings in the general manual.
  1513.  
  1514. ===============================================================================
  1515. = HTML Tutorials, References and Validation
  1516. ===============================================================================
  1517.  
  1518. A Beginner's Guide To HTML,
  1519. http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html
  1520.  
  1521. Introducing HTML 3.2
  1522. http://www.w3.org/pub/WWW/MarkUp/Wilbur/
  1523.  
  1524. Introduction to HTML and URLs
  1525. http://www.utoronto.ca/webdocs/HTMLdocs/NewHTML/intro.html
  1526.  
  1527. Guide to HTML Commands
  1528. http://www.woodhill.co.uk/html/html.htm
  1529.  
  1530. Creating HTML - A simple guide
  1531. http://www.netusa1.net/~jbornema/html.html
  1532.  
  1533. Creating Net Sites
  1534. http://home.netscape.com/assist/net_sites/
  1535.  
  1536. The Bare Bones Guide to HTML
  1537. http://werbach.com/barebones/
  1538.  
  1539. JavaScript
  1540. http://home.netscape.com/eng/mozilla/3.0/handbook/javascript/
  1541.  
  1542. HTML Validation
  1543. http://www.webtechs.com/html-val-svc/
  1544.